package com.hdoit.kylin.web.groupActivity.modelconfig;

import com.hdoit.kylin.web.groupActivity.provider.MeetingTypeProvider;
import com.tennetcn.common.enums.regular.MathRegularExpressions;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RegularExpressionAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      lufu
 * @email       
 * @createtime  2017年08月01日 09:30:40
 * @comment
 */
public class AcademicReportConfig extends ModelMetadataAttributeConfiguration{
    public AcademicReportConfig(){
        this.setProperty("date")
            .hasAttribute(new DisplayNameAttribute("日期"))
            .hasAttribute(new RequiredAttribute("日期为必填项"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("week")
            .hasAttribute(new DisplayNameAttribute("周"))
            .hasAttribute(new DropDownListAttribute())
            .hasAttribute(new RegularExpressionAttribute(MathRegularExpressions.positiveNumber));

        this.setProperty("people")
            .hasAttribute(new DisplayNameAttribute("汇报人"));
        
        this.setProperty("type")
        	.hasAttribute(new DisplayNameAttribute("会议类型"))
        	.hasAttribute(new DropDownListAttribute(new MeetingTypeProvider()));

        this.setProperty("content")
            .hasAttribute(new DisplayNameAttribute("汇报内容"))
            .hasAttribute(new RequiredAttribute("汇报内容为必填项"));

        this.setProperty("schedule")
            .hasAttribute(new DisplayNameAttribute("会议安排"));

        this.setProperty("document")
            .hasAttribute(new DisplayNameAttribute("会议文档"));

        this.setProperty("comments")
            .hasAttribute(new DisplayNameAttribute("总结"));

    }
}